package com.kingstar.ceres.entity.secondary;


import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Tolerate;

import java.util.Date;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * CMDS汇总成交行情表
 *
 * @author 傻男人
 * @since 2022-03-30
 */

@Data
@ToString(callSuper = true)
@TableName(value = "k_cmds_market_data_summary_bond")
@Builder
public class KCmdsMarketDataSummaryBond implements Serializable {

    private static final long serialVersionUID = 1L;

    @Tolerate
    public KCmdsMarketDataSummaryBond() {
    }

    /**
     * 债券代码
     */
	@TableField("security_id")
	private String securityId;
    /**
     * 债券名称
     */
	private String symbol;
    /**
     * 报文生成时间
     */
	@TableField("transact_time")
	private String transactTime;
    /**
     * 行情类型
     */
	@TableField("md_type")
	private String mdType;
    /**
     * 市场标识
     */
	@TableField("market_indicator")
	private String marketIndicator;
    /**
     * 交易方式
     */
	@TableField("trade_method")
	private String tradeMethod;
    /**
     * 详细行情类型
     */
	@TableField("md_sub_type")
	private String mdSubType;
    /**
     * 年化代偿期
     */
	@TableField("term_to_maturity")
	private String termToMaturity;
    /**
     * 前收盘净价
     */
	@TableField("pre_clo_price")
	private BigDecimal preCloPrice;
    /**
     * 前加权平均净价
     */
	@TableField("pre_weight_avg_price")
	private BigDecimal preWeightAvgPrice;
    /**
     * 最新净价
     */
	@TableField("new_price")
	private BigDecimal newPrice;
    /**
     * 开盘净价
     */
	@TableField("open_price")
	private BigDecimal openPrice;
    /**
     * 最高净价
     */
	@TableField("high_price")
	private BigDecimal highPrice;
    /**
     * 最低净价
     */
	@TableField("lower_price")
	private BigDecimal lowerPrice;
    /**
     * 收盘净价
     */
	@TableField("close_price")
	private BigDecimal closePrice;
    /**
     * 加权平均净价
     */
	@TableField("weight_avg_price")
	private BigDecimal weightAvgPrice;
    /**
     * 成交量
     */
	@TableField("deal_num")
	private BigDecimal dealNum;
    /**
     * 涨跌幅
     */
	@TableField("price_change_wave")
	private BigDecimal priceChangeWave;
    /**
     * 前收盘收益率
     */
	@TableField("pre_close_yield")
	private BigDecimal preCloseYield;
    /**
     * 前加权平均收益率
     */
	@TableField("pre_weight_avg_yield")
	private BigDecimal preWeightAvgYield;
    /**
     * 开盘收益率
     */
	@TableField("open_yield")
	private BigDecimal openYield;
    /**
     * 最新收益率
     */
	@TableField("new_yield")
	private BigDecimal newYield;
    /**
     * 最高收益率
     */
	@TableField("high_yield")
	private BigDecimal highYield;
    /**
     * 加权平均收益率
     */
	@TableField("weight_avg_yield")
	private BigDecimal weightAvgYield;
    /**
     * 最低收益率
     */
	@TableField("lower_yield")
	private BigDecimal lowerYield;
    /**
     * 收盘收益率
     */
	@TableField("close_yield")
	private BigDecimal closeYield;
    /**
     * 成交笔数
     */
	@TableField("deal_total")
	private Long dealTotal;
    /**
     * 净价涨跌
     */
	@TableField("price_change")
	private BigDecimal priceChange;
    /**
     * 收益率涨跌
     */
	@TableField("yield_change")
	private BigDecimal yieldChange;
    /**
     * 其它
     */
	private String other;
    /**
     * 来源
     */
	@TableField("message_source")
	private String messageSource;
    /**
     * 创建时间
     */
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private Long createTime;
    /**
     * 成交日期
     */
	@TableField("trade_date")
	private String tradeDate;
    /**
     * 成交时间
     */
	@TableField("trade_time")
	private String tradeTime;
    /**
     * 成交时间（时间戳）
     */
	@TableField("quotation_time")
	private Long quotationTime;

	public class Meta {
        public static final String SECURITY_ID = "security_id";
        public static final String SYMBOL = "symbol";
        public static final String TRANSACT_TIME = "transact_time";
        public static final String MD_TYPE = "md_type";
        public static final String MARKET_INDICATOR = "market_indicator";
        public static final String TRADE_METHOD = "trade_method";
        public static final String MD_SUB_TYPE = "md_sub_type";
        public static final String TERM_TO_MATURITY = "term_to_maturity";
        public static final String PRE_CLO_PRICE = "pre_clo_price";
        public static final String PRE_WEIGHT_AVG_PRICE = "pre_weight_avg_price";
        public static final String NEW_PRICE = "new_price";
        public static final String OPEN_PRICE = "open_price";
        public static final String HIGH_PRICE = "high_price";
        public static final String LOWER_PRICE = "lower_price";
        public static final String CLOSE_PRICE = "close_price";
        public static final String WEIGHT_AVG_PRICE = "weight_avg_price";
        public static final String DEAL_NUM = "deal_num";
        public static final String PRICE_CHANGE_WAVE = "price_change_wave";
        public static final String PRE_CLOSE_YIELD = "pre_close_yield";
        public static final String PRE_WEIGHT_AVG_YIELD = "pre_weight_avg_yield";
        public static final String OPEN_YIELD = "open_yield";
        public static final String NEW_YIELD = "new_yield";
        public static final String HIGH_YIELD = "high_yield";
        public static final String WEIGHT_AVG_YIELD = "weight_avg_yield";
        public static final String LOWER_YIELD = "lower_yield";
        public static final String CLOSE_YIELD = "close_yield";
        public static final String DEAL_TOTAL = "deal_total";
        public static final String PRICE_CHANGE = "price_change";
        public static final String YIELD_CHANGE = "yield_change";
        public static final String OTHER = "other";
        public static final String MESSAGE_SOURCE = "message_source";
        public static final String CREATE_TIME = "create_time";
        public static final String TRADE_DATE = "trade_date";
        public static final String TRADE_TIME = "trade_time";
        public static final String QUOTATION_TIME = "quotation_time";
    }
}